-
Notifications
You must be signed in to change notification settings - Fork 0
/
enterprise use case for qworum.ts
86 lines (72 loc) · 1.98 KB
/
enterprise use case for qworum.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// TypeScript pseudocode for an enterprise project management use case.
/**
* Placeholder for the Json datatype.
* @see {@link https://qworum.net/en/specification/v1/#json}
*/
type JsonValue = string | number | boolean | Array<JsonValue> | {} | null;
/**
* Interface for an HR service. Application available at the `home` end-point.
*/
interface IHumanResources {
/**
* Main interactive end-point. Never returns.
* Absolute path within web origin: /home/
* @public
* @returns {JsonValue}
*/
home: () => JsonValue;
/**
* Interactive end-point that returns a list of employees that the end-user finalizes interactively.
* Absolute path within web origin: /choose-employees/
* @public
* @param {JsonValue} pattern - Matching criteria for employees.
* @returns {JsonValue}
*/
chooseEmployees: (pattern: JsonValue) => JsonValue;
}
/**
* Interface for a room booking service.
*/
interface IRooms {
/**
* Interactive end-point for booking a room in the company buildings.
* Absolute path within web origin: /book-room/
* @public
* @param {JsonValue} pattern - Matching criteria for rooms.
* @returns {JsonValue}
*/
bookRoom: (pattern: JsonValue) => JsonValue;
}
interface ICollaborationSoftware { /* ... */ }
/**
* Interface for a project management service. Application available at the `home` end-point.
*/
interface IProjectManager {
/**
* Metadata about the projects that the end-user is involved in.
* @private
*/
projects: JsonValue;
/**
* Remote service for adding employees to the project.
* @private
*/
hr: IHumanResources;
/**
* Remote service for booking physical rooms.
* @private
*/
rooms: IRooms;
/**
* Remote online collaboration service.
* @private
*/
collaborationSoftware: ICollaborationSoftware;
/**
* Main interactive end-point. Never returns.
* Absolute path within web origin: /home/
* @public
* @returns {JsonValue}
*/
home: () => JsonValue;
}